<%@ Page Language="C#" AutoEventWireup="true" CodeFile="GonzalesLogChangeAuthorizer.aspx.cs" Inherits="GonzalesLogChangeAuthorizer" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
    <link href="WebStyle.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
<!--
.HorizontalLineFromTop {	border-top-width: 1px;
	border-top-style: solid;
	border-top-color: #999999;
}
-->
    </style>
    
        <link rel="stylesheet" href="js/windowfiles/dhtmlwindow.css" type="text/css" />
    <script type="text/javascript" src="js/windowfiles/dhtmlwindow.js">

    /***********************************************
    * DHTML Window Widget-  Dynamic Drive (www.dynamicdrive.com)
    * This notice must stay intact for legal use.
    * Visit http://www.dynamicdrive.com/ for full source code
    ***********************************************/

    </script>

    <link rel="stylesheet" href="js/modalfiles/modal.css" type="text/css" />
    <script type="text/javascript" src="js/modalfiles/modal.js"></script>
    <script type="text/javascript" src="js/modaltools.js"></script>
    
    <script type="text/javascript" language="javascript">
                    
        function AnalyzeResultByParent() {
            
            var Result = AnalyzeModalResult(document.getElementById("ModalResult"));
            
            document.getElementById("TextBox_ClaimedByName").value = Result["EmployeeName"];
            document.getElementById("HiddenField_PersonnelInternalID").value = Result["EmployeeInternalID"];
                        
        }
        

    </script>       
    
</head>
<script type="text/javascript" language="javascript" src="js/popcalendar.js"></script>
<script type="text/javascript" language="javascript" src="js/common.js"></script>
<body>
<form id="form1" runat="server" text='Claimants'>
<input type="hidden" name="ModalResult" id="ModalResult" />
  <div>
    <table width="100%" border="0" cellspacing="1" cellpadding="8">
      <tr>
        <td class="PageTitle"><asp:Label ID="Label_PageTitle" Text='Log Changes' 
                runat="server" />
        </td>
      </tr>
      <tr>
        <td><table width="100%" border="0" cellspacing="1" cellpadding="2">
          <tr>
            <td width="170" rowspan="2" valign="top">
                <asp:Label CssClass="FormTitle" 
                    ID="Label_Information" runat="server" Text='Log Change :: ' /></td>
            <td width="8" rowspan="2" class="VerticalDivider">&nbsp;</td>
            <td width="967"><asp:Table CellPadding="5" CellSpacing="0" ID="Table_MessageBox" Width="100%" runat="server" Visible="false">
              <asp:TableRow>
                <asp:TableCell CssClass="ErrorBox" ></asp:TableCell>
              </asp:TableRow>
            </asp:Table></td>
          </tr>
          <tr>
            <td><table width="100%" border="0" cellpadding="5" cellspacing="0" class="FormBorder">
              <tr>
                <td width="25%" class="FormLineItem"><asp:Label CssClass="FormField" ID="Label_Entity" runat="server" Text='Entity:' />
                <td width="25%" class="FormLineItem"><asp:DropDownList CssClass="FormDropDown" ID="DropDownList_ByEntity" runat="server" OnSelectedIndexChanged="DropDownList_ByEntity_SelectedIndexChanged" AutoPostBack="True"></asp:DropDownList></td>
                <td width="25%" class="FormLineItem"><asp:Label CssClass="FormField" ID="Label_Company" runat="server" Text='Company:' />
                <td width="25%" class="FormLineItem"><asp:DropDownList CssClass="FormDropDown" ID="DropDownList_ByCompany" runat="server"></asp:DropDownList></td>
              </tr>
              <tr>
                <td class="FormLineItemAlt">
                    <asp:Label CssClass="FormField" ID="Label_DateRange" runat="server" Text='Date Range:' />                
                  <span class="MessageError">*</span></td>
                <td class="FormLineItemAlt"><asp:TextBox CssClass="FormTextBox" ID="TextBox_SubmittedDateFrom" runat="server" Columns="10" /><img src="img/calendar.gif" runat="server" id="img_calendarFrom" style="vertical-align:middle;"/><asp:Label ID="Label_To" Text="To" runat="server" CssClass="FormField" />                  
                  <asp:TextBox CssClass="FormTextBox" ID="TextBox_SubmittedDateTo" runat="server" Columns="10" /><img src="img/calendar.gif" id="img_calendarTo" runat="server" style="vertical-align:middle;" /></td>
                <td class="FormLineItemAlt">&nbsp;</td>
                <td class="FormLineItemAlt">&nbsp; &nbsp;</td>
              </tr>
              <tr>
                <td class="FormLineItem"><asp:Label ID="Label_Grouping" Text='Grouping:' runat="server" CssClass="FormField" /></td>
                <td colspan="3" class="FormLineItem"><span class="TableResultCriteriaBar">
                  <asp:DropDownList CssClass="FormDropDown" ID="DropDownList_GroupBy" runat="server"></asp:DropDownList>
                  </span>
                 </td>
              </tr>
              <tr>
                <td class="FormLineItemAlt"><asp:Label ID="Label_Sorting" Text='Sorting:' runat="server" CssClass="FormField" /></td>
                <td colspan="3" class="FormLineItemAlt"><span class="TableResultCriteriaBar">
                  <asp:DropDownList CssClass="FormDropDown" ID="DropDownList_SortBy" runat="server"></asp:DropDownList>
                </span><span class="TableResultCriteriaBar">
                <asp:DropDownList CssClass="FormDropDown" ID="DropDownList_SortOrder" runat="server"></asp:DropDownList>
                </span></td>
              </tr>
              <tr>
                <td colspan="4" class="FormLineItem"><asp:Button CssClass="FormButton" ID="Button_Submit" runat="server" Text="Output to Screen" OnClick="Button_Submit_Click" />
                        <asp:Button CssClass="FormButton" ID="Button_CSV" runat="server" 
                        Text="Export to PDF File" OnClick="Button_CSV_Click" />                        
                        <asp:HyperLink ID="HyperLink_FileDownload" runat="server" CssClass="GridViewLink" Text ="Hyperlink"></asp:HyperLink>
                </td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td colspan="3" valign="top" class="HorizontalLineFromTop"></td>
          </tr>
          <tr>
            <td colspan="3" valign="top">&nbsp;
                <asp:GridView ID="GridViewResult" runat="server" CellPadding="5" CssClass="FormBorder"
                    Width="100%" AutoGenerateColumns="False" OnRowCreated = "OnRowCreated" 
                    onrowdatabound="GridViewResult_RowDataBound">
                    <RowStyle CssClass="GridViewItem" />
                  <HeaderStyle CssClass="GridViewHeader" />                  
                    <Columns>                    
                        <asp:BoundField DataField="Instance" HeaderText="Instance" >
                            <ItemStyle HorizontalAlign="center" />
                        </asp:BoundField>
                        <asp:BoundField DataField="DateTime" HeaderText="Date/Time" >
                            <ItemStyle HorizontalAlign="center" />
                        </asp:BoundField>
                        <asp:BoundField DataField="LoggedBy" HeaderText="Logged By" >
                            <ItemStyle HorizontalAlign="left" />
                        </asp:BoundField>
                        <asp:BoundField DataField="LoggedByRole" HeaderText="Logged By Role" >
                            <ItemStyle HorizontalAlign="left" />
                        </asp:BoundField>
                        <asp:BoundField DataField="UserIDAffected" HeaderText="User ID Affected" >
                            <ItemStyle HorizontalAlign="left" />
                        </asp:BoundField>
                        <asp:BoundField DataField="EmployeeID" HeaderText="Employee ID" >
                            <ItemStyle HorizontalAlign="center" />
                        </asp:BoundField>
                        <asp:BoundField DataField="EntityCode" HeaderText="Entity Code" >
                            <ItemStyle HorizontalAlign="center" />
                        </asp:BoundField>
                        <asp:BoundField DataField="CompanyID" HeaderText="Company ID" >
                            <ItemStyle HorizontalAlign="center" />
                        </asp:BoundField>
                        <asp:BoundField DataField="Module" HeaderText="Module" >
                            <ItemStyle HorizontalAlign="center" />
                        </asp:BoundField>
                        <asp:BoundField DataField="ChangeField" HeaderText="Change Field" >
                            <ItemStyle HorizontalAlign="left" />
                        </asp:BoundField>
                        <asp:BoundField DataField="Action" HeaderText="Action" >
                            <ItemStyle HorizontalAlign="center" />
                        </asp:BoundField>
                        <asp:BoundField DataField="PreviousValue" HeaderText="Previous Value" >
                            <ItemStyle HorizontalAlign="left" />
                        </asp:BoundField>
                        <asp:BoundField DataField="NewValue" HeaderText="New Value" >
                            <ItemStyle HorizontalAlign="left" />
                        </asp:BoundField>
                    </Columns>
                </asp:GridView>
            </td>
          </tr>
        </table></td>
      </tr>
    </table>
  </div>
</form>
</body>
</html>
